import request from '@/utils/request'
// 运维工单表格api
export const getYunWeiTasks = (params) => request({
  url: '/task-service/task/search',
  method: 'get',
  params
})

// 运维工单状态选项api
export const getStatusList = () => request('/task-service/task/allTaskStatus')

// 工单类型api
export const getTypeList = () => request('/task-service/taskType/list')

// 维护人员名单api
export const getRepairerList = (code) => request(`/user-service/user/repairerList/${code}`)

// 取消工单
export const cancelTask = (id) => request.post(`/task-service/task/cancel/${id}`)

// 创建工单api
export const createTask = (data) => request({
  url: '/task-service/task/create',
  method: 'post',
  data
})
